define(['app'], function(app) {
	'use strict';

	//实例化方法
	var factory = function(Http) {
		function get_data_partList(result) {
			if(false) {
				result = '{"success": false,"msg": "","result": {"role": ['+
						'{"id": "001","name": "售前客服"},'+
						'{"id": "002","name": "售后客服"}]},"session": "7311da98bd0f18eb15a96bcb263f4153"}';
				return JSON.parse(result);
			} else {
				return result;
			}
		}

		//返回信息
		return {
			//我的店员角色一览
			part_list: function(nPage,callback,calldone) {
				//post请求
				Http.post({
					method: 'member.assistente.partlist',
					nPage:nPage,
					pagelimit: 10,
				}, function(result) {
					//函数回调
					if(callback)
						callback(get_data_partList(result).result);

				}, function(e) {

				}, function() {
				    if(calldone)
                    	calldone();
				});

			},
			part_delete: function(id,callback) {
				//post请求
				Http.post({
					method: 'member.assistente.partdelete',
					id: id
				}, function(result) {
					//函数回调
					if(callback)
						callback(result);
				}, function(e) {

				}, function() {

				});

			},
		};
	}

	factory.$inject = ['Http'];
	return app.registerService("Employeemanager_rights", factory);
});